<?php
//This is a custom function written by Nathan Rice.
//It has its limitations, but is otherwise a darn good breadcrumb script.
function the_breadcrumb() {
global $post;
if (!is_home()) {
		echo '<div id="breadcrumb"><a href="';
		echo get_option('home');
		echo '">Home</a>';
		
		if (is_category() || is_single()) {
			echo ' / ';
			the_category(', ');
			if (is_single()) {
				echo " / ";
				the_title();
			}
		}
		
		elseif (is_page()) {
		    $parent_id  = $post->post_parent;
		    $breadcrumbs = array();
		    while ($parent_id) {
		      $page = get_page($parent_id);
		      $breadcrumbs[] = '<a href="'.get_permalink($page->ID).'" title="">'.get_the_title($page->ID).'</a>';
		      $parent_id  = $page->post_parent;
		    }
		    $breadcrumbs = array_reverse($breadcrumbs);
		    foreach ($breadcrumbs as $crumb) echo ' / '.$crumb;
		    echo " / "; the_title();
		}
		echo '</div>';
}}
?>